<%namespace name="jsloader" file="/home/jsloader.html"/>
<%namespace name="dochead"  file="/home/dochead.html"/>
<%namespace name="header"   file="/common/header.html"/>
<%namespace name="footer"   file="/common/footer.html"/>

${dochead.html("HAR Storage")}
${header.html()}
<center>

    <div class="summary" id="summary-table">


        % if c.filter_label:
            <p class="title"><a href="${h.url_for(controller='results',action='index')}">Series</a> / ${c.filter_label}</p>
        % else:
            <p class="title">Series</p>
        % endif

        <table class="display" id="stats_table">
            <thead>
                <tr>
                    <th width="20%" class="left">Label</th>
                    <th width="60%" class="left">URL</th>
                    <th width="20%" class="left">Last update</th>
                </tr>
            </thead>
            <tbody>
                % for index in range(c.rowcount):
                <tr>
                    <td class="left">${c.metrics_table[1][index]}</td>
                    % if str(c.metrics_table[0][index]) == "__search__":
                        <td class="left"><a href="${h.url_for(controller='results',action='index',label=c.metrics_table[1][index],method='GET')}">[show entries]</a></td>
                    % elif c.metrics_table[4][index]:
                        <td class="left"><a href="${h.url_for(controller='results',action='details',series=c.metrics_table[0][index],method='GET')}"><b>${c.metrics_table[4][index]}</b> - ${c.metrics_table[2][index]}</a></td>
                    % else:
                        <td class="left"><a href="${h.url_for(controller='results',action='details',series=c.metrics_table[0][index],method='GET')}">${c.metrics_table[2][index]}</a></td>
                    % endif
                    <td class="left">${c.metrics_table[3][index]}</td>
                </tr>
                % endfor
            </tbody>
        </table>

        <button type="button" onclick="window.location.href='/superposed/create';">Aggregate and Compare</button>
    </div>
</center>
${jsloader.html()}
${footer.html()}
